#include <basic/errcode.h>
#include <basic/dbc.h>
#include <custom/db.h>

#include "dbpasswd.c"

int oraproc_connect_secure(char *dbuser, char *dbpasswd_enc,
        char *host)
{/*{{{*/
    char dbpasswd[PASSWD_SIZE+1];

    if(dbpasswd_decrypt(dbpasswd_enc, dbpasswd))
        return(ORA_ERROR);
    return(oraproc_connect(dbuser, dbpasswd, host));
}/*}}}*/

int oraproc_connect_secure_ex(char *dbuser, char *dbpasswd_enc,
        char *host, ORAPROC *pdb)
{/*{{{*/
    char dbpasswd[PASSWD_SIZE+1];

    if(dbpasswd_decrypt(dbpasswd_enc, dbpasswd))
        return(ORA_ERROR);
    return(oraproc_connect_ex(dbuser, dbpasswd, host, pdb));
}/*}}}*/
